//
//  Goroutines relay
//

package main

import (
	"fmt"
)

func step1(done2 chan string) {
	done2 <- "ready"
}

func step2(done3 chan string) {
	done2 := make(chan string)
	go step1(done2)
	<-done2
	done3 <- "ready"
}

func main() {
	fmt.Println("Goroutines relay")
	done3 := make(chan string)
	go step2(done3)
	<-done3
	fmt.Println("Test successful!")
}
